package com.java.java8.lambdademo;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

/**
 * @author liyanhao
 * @Date 2023-02-25 12:41
 */
public class LambdaDemo {
    public static void main(String[] args) {
        List<String> names = Arrays.asList("perterA", "perterB", "perterC", "perterd");
        Collections.sort(names, (a, b) -> b.compareTo(a));
        System.out.println(names);
    }
}
